package org.cx.oa.service.impl;

import java.util.List;

import org.cx.oa.dao.CustomerDao;
import org.cx.oa.entity.Customer;
import org.cx.oa.service.CustomerService;
import org.cx.oa.util.BeanFactory;
@SuppressWarnings("unchecked")
public class CustomerServiceImpl implements CustomerService {

	private CustomerDao<Customer> customerDao=BeanFactory.getImpl(CustomerDao.class);

	@Override
	public List<Customer> FindAll() {
		return customerDao.findAll();
	}

	@Override
	public Customer ById(int id) {
		return customerDao.findById(id);
	}

	@Override
	public void Update(Customer obj) {
		customerDao.update(obj);
	}

	@Override
	public void Delete(Customer obj) {
		customerDao.delete(obj);
		
	}

	@Override
	public void Add(Customer obj) {
		customerDao.save(obj);
	}

	@Override
	public List<Customer> ByIdList(Integer[] idList) {
		return customerDao.getByIdList(idList);
	}
}
